﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Icst.Leaflike.Web;
using Icst.Leaflike.Data;


namespace Icst.Leaflike.Web.search
{
    public partial class branch : pagesearch
    {
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            AddSelection(brachSelector,Tree.YEXU);
            AddListbox(rblDanfuye, Tree.DANFUYE);
        }
        protected override string OnSave(bool empty)
        {
            SearchQuery[SearchOption.Yexu] = empty ? string.Empty : brachSelector.Selected;
            SearchQuery[SearchOption.Danfuye] = empty ? string.Empty : rblDanfuye.SelectedValue;
            return "search_leaf.htm";
        }
        protected override void OnLoad()
        {
            brachSelector[SearchQuery[SearchOption.Yexu]] = true;
            if (!string.IsNullOrEmpty(SearchQuery[SearchOption.Danfuye]))
                rblDanfuye.SelectedValue = SearchQuery[SearchOption.Danfuye];
        }
    }
}
